<template>
	<view class="container">
		<view class="helplist">
			<block v-for="(item,index) in rows" :key="index">
			<!-- <navigator hover-class="none" :url="'/pages/user/helpdetail/helpdetail?ggid='+item.id"> -->
			<navigator hover-class="none" :url="'/pages/goodsdetail/goodsdetail?id='+item.id">
			<view class="help_dl">
				<view class="help_dt">
					<view class="help_title">{{item.name}}</view>
					<view class="help_time">{{formatdate(item.createtime)}}</view>
					<view class="help_time">园区新闻</view>
				</view>
				<view class="help_dd">{{item.desc}}</view>
			</view>
			</navigator>
			</block>
		</view>
	</view>
</template>

<script>
	import API from "@/common/api.js"
	export default {
		data() {
			return {
				rows:[]
			}
		},
		
		onLoad(){
			var $this = this
			API.post("common/notice").then((res) => {
			  if(res.code==1){
				$this.rows = res.data
			  }
			})
		},
		methods: {
			formatdate(value){
				return API.formatDate(value,"Ymd")
			}
		}
	}
</script>

<style lang="scss">
.helplist{width: 100%; overflow: hidden; box-sizing: border-box; padding:20rpx 30rpx;}
.mymenu{padding: 20rpx 60rpx; overflow: hidden; position: relative; z-index: 2; width: 100%; box-sizing: border-box;}
.help_dl{width: 100%; overflow: hidden; padding: 36rpx 0; line-height: 48rpx; position: relative; border-bottom: 2rpx #e8e8e8 dashed;}
.help_dt{display: flex; width: 100%;}
.help_title{font-size: 36rpx; font-weight: bold; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.help_time{color: #999; margin-left: 40rpx;}
.help_dd{width: 100%; overflow: hidden; color: #666; margin-top: 20rpx; font-size: 28rpx; text-overflow: -o-ellipsis-lastline;	overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2;	line-clamp: 2; -webkit-box-orient: vertical; white-space: normal !important;}
</style>
